import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/", //根目录
      name: "Home",
      component: (resolve) => require(["@/components/home/home"], resolve),
      meta: {
        keepAlive: true,
      },
    },
    {
      path: "/room/:id",
      name: "Room",
      component: (resolve) => require(["@/components/room/room"], resolve),
    },
    {
      path: "/roomList",
      name: "roomList",
      component: (resolve) =>
        require(["@/components/room/roomList/roomList"], resolve),
    },
    {
      path: "/gameList",
      name: "gameList",
      component: (resolve) =>
        require(["@/components/room/roomList/gameList"], resolve),
    },
    {
      path: "/attentionItem",
      name: "attentionItem",
      component: (resolve) =>
        require([
          "@/components/personalCenter/myAttention/attentionItem",
        ], resolve),
    },
    {
      path: "/leaderBoard",
      name: "leaderBoard",
      component: (resolve) =>
        require([
          "@/components/room/chatRoom/leaderBoard/leaderBoard",
        ], resolve),
    },
    {
      path: "/lotteryResult", //开奖结果
      name: "LotteryResult",
      component: (resolve) =>
        require(["@/components/room/lotteryResult/lotteryResult"], resolve),
    },
    {
      path: "/lotteryTrend", //开奖走势
      name: "LotteryTrend",
      component: (resolve) =>
        require(["@/components/room/lotteryTrend/lotteryTrend"], resolve),
    },
    {
      path: "/playIntro", //玩法介绍
      name: "PlayIntro",
      component: (resolve) =>
        require(["@/components/room/playIntro/playIntro"], resolve),
      meta: {
        keepAlive: true,
      },
    },
    {
      path: "/introDetail", //玩法详情
      name: "IntroDetail",
      component: (resolve) =>
        require(["@/components/room/playIntro/introDetail"], resolve),
    },
    {
      path: "/home", //首页
      name: "Home",
      component: (resolve) => require(["@/components/home/home"], resolve),
    },
    {
      path: "/login", //登录
      name: "Login",
      component: (resolve) => require(["@/components/login/login"], resolve),
    },
    {
      path: "/reg", //注册
      name: "Reg",
      component: (resolve) => require(["@/components/reg/reg"], resolve),
    },
    {
      path: "/activityCenter", //活动中心
      name: "ActivityCenter",
      component: (resolve) =>
        require(["@/components/activityCenter/activityCenter"], resolve),
    },
    {
      path: "/sudoku", //九宫格
      name: "Sudoku",
      component: (resolve) =>
        require(["@/components/activityCenter/sudoku/sudoku"], resolve),
    },
    {
      path: "/guaguale", //刮刮乐
      name: "guaguale",
      component: (resolve) =>
        require(["@/components/activityCenter/guaguale/guaguale"], resolve),
    },
    {
      path: "/fudai", //福袋
      name: "Fudai",
      component: (resolve) =>
        require(["@/components/activityCenter/fudai/fudai"], resolve),
    },

    {
      path: "/msgCenter", //消息中心
      name: "MsgCenter",
      component: (resolve) =>
        require(["@/components/msgCenter/msgCenter"], resolve),
      children: [
        {
          path: "dataDetail", //消息中心 - > 消息详情
          name: "DataDetail",
          component: (resolve) =>
            require(["@/components/msgCenter/dataDetail"], resolve),
        },
      ],
    },
    {
      path: "/server", //客服中心
      name: "Server",
      component: (resolve) => require(["@/components/server/server"], resolve),
      // meta: {
      //   keepAlive: true
      // },
      children: [
        {
          path: "faqDetails", //客服中心 - > 问题详情
          name: "FaqDetails",
          component: (resolve) =>
            require(["@/components/server/faqDetails"], resolve),
        },
      ],
    },

    {
      path: "/contact", //客服中心 - > 联系我们
      name: "Contact",
      component: (resolve) => require(["@/components/server/contact"], resolve),
    },
    {
      path: "/feedback", //客服中心 - > 意见反馈
      name: "Feedback",
      component: (resolve) =>
        require(["@/components/server/feedback"], resolve),
    },
    {
      path: "/redPacket/rule", //红包 - > 红包规则
      name: "Rule",
      component: (resolve) => require(["@/components/redPacket/rule"], resolve),
    },
    {
      path: "/redPacket/details", //红包 - > 红包详情
      name: "Details",
      component: (resolve) =>
        require(["@/components/redPacket/details"], resolve),
    },
    {
      path: "/redPacket/record", //红包 - > 红包记录
      name: "Record",
      component: (resolve) =>
        require(["@/components/redPacket/record"], resolve),
    },
    {
      path: "/personalCenter", //个人中心
      name: "PersonalCenter",
      component: (resolve) =>
        require(["@/components/personalCenter/personalCenter"], resolve),
    },
    {
      path: "/personal", //个人资料
      name: "Personal",
      component: (resolve) =>
        require(["@/components/personalCenter/personal/personal"], resolve),
    },
    {
      path: "/personal/revisePage", //修改昵称 qq 邮箱 手机号码。。
      name: "revisePage",
      component: (resolve) =>
        require(["@/components/personalCenter/personal/revisePage"], resolve),
    },
    {
      path: "/avaterPage", //系统头像
      name: "avaterPage",
      component: (resolve) =>
        require(["@/components/personalCenter/personal/avaterPage"], resolve),
    },
    {
      path: "/agencyShare", //代理分享
      name: "agencyShare",
      component: (resolve) =>
        require([
          "@/components/personalCenter/agencyShare/agencyShare",
        ], resolve),
    },
    {
      path: "/agencyRole", //代理制度
      name: "agencyRole",
      component: (resolve) =>
        require([
          "@/components/personalCenter/agencyShare/agencyRole",
        ], resolve),
    },
    {
      path: "/setting", //设置
      name: "Setting",
      component: (resolve) =>
        require(["@/components/personalCenter/setting/setting"], resolve),
    },
    {
      path: "/modificationPath", //修改路线
      name: "ModificationPath",
      component: (resolve) =>
        require([
          "@/components/personalCenter/setting/modificationPath/modificationPath",
        ], resolve),
    },
    {
      path: "/activityContent", //修改路线
      name: "ActivityContent",
      component: (resolve) =>
        require([
          "@/components/personalCenter/activityContent/activityContent",
        ], resolve),
    },
    {
      path: "/taskCenter", //任务中心
      name: "TaskCenter",
      component: (resolve) =>
        require(["@/components/personalCenter/taskCenter/taskCenter"], resolve),
    },
    {
      path: "/rebate", //天天返利
      name: "Rebate",
      component: (resolve) =>
        require(["@/components/personalCenter/rebate/rebate"], resolve),
    },
    {
      path: "/teamManagement", //团队管理
      name: "TeamManagement",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/teamManagement",
        ], resolve),
    },
    //wallet
    {
      path: "/wallet", //钱包
      name: "Wallet",
      component: (resolve) => require(["@/components/wallet/wallet"], resolve),
    },
    {
      path: "/recharge", //充值
      name: "Recharge",
      component: (resolve) =>
        require(["@/components/wallet/recharge/recharge"], resolve),
      children: [
        {
          path: "prePaid", //充值 -> 填金额
          name: "PrePaid",
          component: (resolve) =>
            require(["@/components/wallet/recharge/prePaid"], resolve),
        },
        // {
        //   path: 'payment',  //充值 -> 支付
        //   name: 'Payment',
        //   component: resolve => require(['@/components/wallet/recharge/payment'], resolve),
        // },
        // {
        //   path: 'payStatus', //充值 -> 支付 ->状态
        //   name: 'PayStatus',
        //   component: resolve => require(['@/components/wallet/recharge/payStatus'], resolve)
        // },
      ],
    },
    {
      path: "/recharge/payment", //充值 -> 支付
      name: "Payment",
      component: (resolve) =>
        require(["@/components/wallet/recharge/payment"], resolve),
    },
    {
      path: "/recharge/payThirdParty", //充值 -> 第三方支付
      name: "PayThirdParty",
      component: (resolve) =>
        require(["@/components/wallet/recharge/payThirdParty"], resolve),
    },
    {
      path: "/recharge/payStatus", //充值 -> 支付 ->状态
      name: "PayStatus",
      component: (resolve) =>
        require(["@/components/wallet/recharge/payStatus"], resolve),
    },
    {
      path: "/recharge/payStatusErr", //充值 -> 支付 ->状态失败
      name: "PayStatusErr",
      component: (resolve) =>
        require(["@/components/wallet/recharge/payStatusErr"], resolve),
    },
    {
      path: "/moneyTransform", //额度转换
      name: "moneyTransform",
      component: (resolve) =>
        require(["@/components/wallet/moneyTransform/moneyTransform"], resolve),
    },
    {
      path: "/bank", //银行卡
      name: "Bank",
      component: (resolve) =>
        require(["@/components/wallet/bank/bank"], resolve),
    },
    {
      path: "/bank/bankList", //银行卡列表
      name: "BankList",
      component: (resolve) =>
        require(["@/components/wallet/bank/bankList"], resolve),
    },
    {
      path: "/bank/bindBank", //绑定银行卡->银行卡
      name: "BindBank",
      component: (resolve) =>
        require(["@/components/wallet/bank/bindBank"], resolve),
    },
    {
      path: "/bank/bindOK", //绑定银行卡->成功
      name: "BindOK",
      component: (resolve) =>
        require(["@/components/wallet/bank/bindOK"], resolve),
    },
    {
      path: "/withdraw", //提现
      name: "Withdraw",
      component: (resolve) =>
        require(["@/components/wallet/withdraw/withdraw"], resolve),
    },
    {
      path: "/whdProgress", //提现
      name: "WhdProgress",
      component: (resolve) =>
        require(["@/components/wallet/withdraw/whdProgress"], resolve),
    },
    // record
    {
      path: "/DealRecord", //交易记录
      name: "DealRecord",
      component: (resolve) =>
        require(["@/components/wallet/record/DealRecord"], resolve),
      meta: {
        keepAlive: true,
      },
    },
    {
      path: "/recordDetail", //交易记录
      name: "RecordDetail",
      component: (resolve) =>
        require(["@/components/wallet/record/recordDetail"], resolve),
    },
    {
      path: "/paysafe", //支付安全
      name: "Paysafe",
      component: (resolve) =>
        require(["@/components/wallet/paysafe/paysafe"], resolve),
    },
    {
      path: "/moneyPassword", //支付安全 -> 修改资金密码
      name: "MoneyPassword",
      component: (resolve) =>
        require(["@/components/wallet/paysafe/moneyPassword"], resolve),
    },
    {
      path: "/paySet", //支付安全 -> 设置资金密码
      name: "PaySet",
      component: (resolve) =>
        require(["@/components/wallet/paysafe/paySet"], resolve),
    },
    {
      path: "/bettingList",
      name: "bettingList",
      component: (resolve) =>
        require([
          "@/components/personalCenter/bettingList/bettingList",
        ], resolve),
    },
    {
      path: "/conversionRecord",
      name: "conversionRecord",
      component: (resolve) =>
        require([
          "@/components/personalCenter/bettingRecord/conversionRecord",
        ], resolve),
    },
    //bettingRecord
    {
      path: "/bettingRecord", //投注记录
      name: "BettingRecord",
      component: (resolve) =>
        require([
          "@/components/personalCenter/bettingRecord/bettingRecord",
        ], resolve),
      meta: {
        keepAlive: true,
      },
    },
    {
      path: "/touZhuDetail", //投注详情
      name: "TouZhuDetail",
      component: (resolve) =>
        require([
          "@/components/personalCenter/bettingRecord/touZhuDetail",
        ], resolve),
    },
    {
      path: "/myAttention", //我的关注
      name: "MyAttention",
      component: (resolve) =>
        require([
          "@/components/personalCenter/myAttention/myAttention",
        ], resolve),
    },
    // insertingCoil
    {
      path: "/insertingCoil", //下线开户
      name: "InsertingCoil",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/insertingCoil/insertingCoil",
        ], resolve),
    },
    //statistics
    {
      path: "/statistics", //自身统计
      name: "Statistics",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/statistics/statistics",
        ], resolve),
    },
    // theTeamReports
    {
      path: "/theTeamReports", //团队报表
      name: "TheTeamReports",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/theTeamReports/theTeamReports",
        ], resolve),
      meta: {
        keepAlive: true,
      },
    },
    {
      path: "/teamReportDetail", //团队报表
      name: "TeamReportDetail",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/theTeamReports/teamReportDetail",
        ], resolve),
    },
    {
      path: "/agency", //代理报表
      name: "Agency",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/agency/agency",
        ], resolve),
    },
    {
      path: "/member", //会员报表
      name: "Member",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/member/member",
        ], resolve),
      meta: {
        keepAlive: true,
      },
    },
    {
      path: "/memberDetail", //会员报表
      name: "MemberDetail",
      component: (resolve) =>
        require([
          "@/components/personalCenter/teamManagement/member/memberDetail",
        ], resolve),
    },
    {
      path: "/vipLevel", //等级制度
      name: "VipLevel",
      component: (resolve) =>
        require(["@/components/personalCenter/vipLevel/vipLevel"], resolve),
    },
    {
      path: "/setting", //设置
      name: "Setting",
      component: (resolve) =>
        require(["@/components/personalCenter/setting/setting"], resolve),
    },
    {
      path: "/revisePsd", //修改密码
      name: "RevisePsd",
      component: (resolve) =>
        require([
          "@/components/personalCenter/setting/revisePsd/revisePsd",
        ], resolve),
    },
    {
      path: "/aboutUs", //关于我们
      name: "AboutUs",
      component: (resolve) =>
        require([
          "@/components/personalCenter/setting/aboutUs/aboutUs",
        ], resolve),
    },
    {
      path: "/article", //文章
      name: "Article",
      component: (resolve) =>
        require(["@/components/article/article"], resolve),
    },
  ],
});

// WEBPACK FOOTER //
// ./src/router/index.js
